/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package cn.ac.iie.di.ban.news.server.test;

import java.lang.reflect.Field;

/**
 *
 * @author zwlin
 */
public class splittest {

	public static void main(String[] args) throws IllegalArgumentException, IllegalAccessException {

		String str = "hello1";
		System.out.println(str);
		for (Field field : str.getClass().getDeclaredFields()) {

			if (field.getName().equals("value")) {
				field.setAccessible(true);
				System.out.println(field.getType().getName());
				char[] cs = (char[]) field.get(str);
				cs[5] = '2';
//				field.set(str, "hello2".toCharArray());
			}
		}
		System.out.println(str);
		if (true) {
			return;
		}
		String t = "a,c;ss|b[csd],[aab];{asdf}(bwfdg)";
		for (String s : t.split("[,;\\|\\[\\](){}]+")) {
			System.out.println(s);
		}
		System.out.println("===================");
		String f = "a::b=c d= f";
		for (String s : f.split("[:=\\s]")) {
			System.out.println(s);
		}
	}
}
